import Vue from 'vue'
import Router from 'vue-router'
import Auth from '@/views/Auth'
import home from '@/views/home'
import lineQuery from '@/views/lineQuery'
import lineDetail from '@/views/lineDetail'
import lineSet from '@/views/lineSet'
import nearSite from '@/views/homePages/nearSite'
import linePlan from '@/views/homePages/linePlan'
import myCollect from '@/views/homePages/myCollect'
import lineList from '@/views/lineList'
import planSelect from '@/views/planSelect'
import planDetail from '@/views/planDetail'

Vue.use(Router)

export default new Router({
  routes: [
    {path: '/', redirect: '/nearSite'},
    {
      path: '/home', name: 'home', component: home,
      children: [
        {path: '/nearSite', name: 'nearSite', component: nearSite},
        {path: '/linePlan', name: 'linePlan', component: linePlan},
        {path: '/myCollect', name: 'myCollect', component: myCollect}
      ]
    },
    {path: '/Auth', name: 'Auth', component: Auth},
    {path: '/lineQuery', name: 'lineQuery', component: lineQuery},
    {path: '/lineDetail', name: 'lineDetail', component: lineDetail},
    {path: '/lineSet', name: 'lineSet', component: lineSet},
    {path: '/lineList', name: 'lineList', component: lineList},
    {path: '/planSelect', name: 'planSelect', component: planSelect},
    {path: '/planDetail', name: 'planDetail', component: planDetail}
  ]
})
